package exception;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

//jdk7自动关闭特性
public class AutoCloseableDemo {
    public static void main(String[] args) {
        try (FileOutputStream fos = new FileOutputStream("./m.txt")){
            fos.write(1);
        }catch (FileNotFoundException e){

        }catch (IOException e){
            System.out.println("aaa");
        }
    }
}
